package com.wr.online.test.model.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wr.online.test.validator.ValidationGroups;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author ：GZHU_WANG
 * @date ：Created in 2021/10/28 23:09
 * @description：
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResumeVO {
    /**
     * 简历id
     */
    private Integer resumeId;
    /**
     * 姓名
     */
    @NotEmpty(message = "名字不能空",groups = {ValidationGroups.Insert.class})
    private String username;
    /**
     * 邮箱
     */
    @NotEmpty(message = "邮箱不能空",groups = {ValidationGroups.Insert.class})
    @Email(message = "邮件格式不对",groups = {ValidationGroups.Insert.class})
    private String email;
    /**
     * 手机号码
     */
    @NotEmpty(message = "手机号码不能空",groups = {ValidationGroups.Insert.class})
    @Pattern(regexp = "^1(3[0-9]|5[0-3,5-9]|7[1-3,5-8]|8[0-9])\\d{8}$",message = "手机格式错误",groups = {ValidationGroups.Insert.class})
    private String phone;
    /**
     * 简历文件地址
     */
    @NotEmpty(message = "简历文件地址不能空",groups = {ValidationGroups.Insert.class})
    private String file;
    /**
     * 微信openid
     */
    @NotEmpty(message = "微信openid不能空",groups = {ValidationGroups.Insert.class})
    private String openid;
    /**
     * 状态，0等待，1通过，2拒绝
     */
    private Integer state;
    /**
     * 投放时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
    private Date launchTime;
}
